package com.beijiteshop.shop.ui.category

import com.beijiteshop.libcommon.network.RetrofitClient
import com.beijiteshop.shop.ui.category.repo.CategoryRepo
import com.beijiteshop.shop.ui.category.repo.CategoryService
import com.beijiteshop.shop.ui.category.vm.CategoryVM
import org.koin.android.viewmodel.dsl.viewModel
import org.koin.dsl.module

/**
 * @Author LiaoZhongKai
 * @Date 2021/3/10 19:29
 * @Description
 */

val categoryModule = module {

    single {
        get<RetrofitClient>().getService(CategoryService::class.java)
    }

    single {
        CategoryRepo(get())
    }

    viewModel {
        CategoryVM(get())
    }
}